import { HttpClient } from "../../../../service/Http/HttpClient";
// import fly from "../../../../service/Http/fly";

const baseUrl = "/api";
/**部门概况 开始*/

//获取项目所有部门
export const getListDepartment = () => {
  const http = HttpClient.instance();
  return http.fetch(baseUrl + "/system/org/findAll", {
    method: "POST",
    headers: {},
  });
};
//项目部门查询
export const getOrgList = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/system/org/getOrgList", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
//单部门同比;
export const situationCompare = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/department/situationCompare", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
//单部门用能趋势
export const situationEnergyTrend = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/department/situationEnergyTrend", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
//部门用能概况
export const situation = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/department/situation", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
/*部门概况  结束*/
/**用能统计 开始 */
//部门用能统计
export const statistical = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/department/statistical", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
//部门用能统计导出
export const statisticalExportExcel = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/department/statisticalExportExcel", {
    method: "POST",
    headers: { qingqiuType: "file" },
    body: pream,
  });
};
/**用能统计 结束 */
/**用能费用统计 开始*/
export const cost = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/department/cost", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
export const costExportExcel = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/department/costExportExcel", {
    method: "POST",
    headers: { qingqiuType: "file" },
    body: pream,
  });
};
/**用能费用统计 结束*/
/**同比分析 开始*/
//部门用能同比
export const analysis = (pream: any) => {
  const http = HttpClient.instance();
  return http.fetch("/api/ems/department/analysis", {
    method: "POST",
    headers: {},
    body: pream,
  });
};
/**同比分析 结束*/
